package com.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 杨世博
 * @date: Created in 9:49 2023/6/3
 */
@Mapper
public interface UserMapper extends BaseMapper<User>{

    User selectForLogin(@Param("username") String username, @Param("email") String email, @Param("password") String password);

    List<User> selectAllByAdmin(String key, Integer pageNum, Integer size);

    long selectCountByAdmin(String key);

    List<User> selectUserByAdmin(Integer pageNum, Integer size);

    long selectUserCountByAdmin();

    void updateImg(Integer uid, String fileName);
}
